package com.acsior.hibernate.vo;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.acsior.dac.impl.hibernate.vo.GeneratorKey;
import com.acsior.dac.impl.hibernate.vo.HibernatePersistantIntegerIdVO;

/**
 * 
 * 
 * @author К. Кръстев <kk@acsior.com>
 */
@Entity
@Table(name = "fiscalization_links")
@GeneratorKey(tableName = "fiscalization_links")
public class FiscalizationLinkVO extends HibernatePersistantIntegerIdVO {

	/** */
	private static final long serialVersionUID = 1813304529290112071L;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "crCodeID", nullable = false)
	private CdCRCodeVO cashService;

	@Column(name = "fss_code", nullable = false, length = 100)
	private String fssCode;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "postal_service_id", nullable = false)
	private PostalServiceVO postService;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "nom_service_extra_id", nullable = false)
	private NomServiceExtraVO serviceExtra;

	/** default constructor */
	public FiscalizationLinkVO() {
		// empty
	}

	/** @return the cashService */
	public CdCRCodeVO getCashService() {
		return this.cashService;
	}

	/** @return the fssCode */
	public String getFssCode() {
		return this.fssCode;
	}

	/** @return the postService */
	public PostalServiceVO getPostService() {
		return this.postService;
	}

	/** @return the serviceExtra */
	public NomServiceExtraVO getServiceExtra() {
		return this.serviceExtra;
	}

	/**
	 * @param cashService
	 *            the cashService to set
	 */
	public void setCashService(CdCRCodeVO cashService) {
		this.cashService = cashService;
	}

	/**
	 * @param fssCode
	 *            the fssCode to set
	 */
	public void setFssCode(String fssCode) {
		this.fssCode = fssCode;
	}

	/**
	 * @param postService
	 *            the postService to set
	 */
	public void setPostService(PostalServiceVO postService) {
		this.postService = postService;
	}

	/**
	 * @param serviceExtra
	 *            the serviceExtra to set
	 */
	public void setServiceExtra(NomServiceExtraVO serviceExtra) {
		this.serviceExtra = serviceExtra;
	}

}
